package com.ruoyi.driver.service.impl;


import com.ruoyi.driver.domain.CarownerVehicleroute;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.driver.mapper.CarownerVehiclerouteMapper;

import com.ruoyi.driver.service.ICarownerVehiclerouteService;

import java.util.List;

/**
 * 车辆路线Service业务层处理
 * 
 * @author Wevon
 * @date 2024-08-13
 */
@Service
public class CarownerVehiclerouteServiceImpl implements ICarownerVehiclerouteService 
{
    @Autowired
    private CarownerVehiclerouteMapper carownerVehiclerouteMapper;

    /**
     * 查询车辆路线
     * 
     * @param id 车辆路线主键
     * @return 车辆路线
     */
    @Override
    public CarownerVehicleroute selectCarownerVehiclerouteById(Long id)
    {
        return carownerVehiclerouteMapper.selectCarownerVehiclerouteById(id);
    }

    /**
     * 查询车辆路线列表
     * 
     * @param carownerVehicleroute 车辆路线
     * @return 车辆路线
     */
    @Override
    public List<CarownerVehicleroute> selectCarownerVehiclerouteList(CarownerVehicleroute carownerVehicleroute)
    {
        return carownerVehiclerouteMapper.selectCarownerVehiclerouteList(carownerVehicleroute);
    }

    /**
     * 新增车辆路线
     *
     * @param carownerVehicleroute 车辆路线
     * @return 结果
     */
    @Override
    public Long insertCarownerVehicleroute(CarownerVehicleroute carownerVehicleroute)
    {
        int num = carownerVehiclerouteMapper.insertCarownerVehicleroute(carownerVehicleroute);
        System.out.println("carownerVehicleroute.getId() = " + carownerVehicleroute.getId());
        return carownerVehicleroute.getId();
    }

    /**
     * 修改车辆路线
     * 
     * @param carownerVehicleroute 车辆路线
     * @return 结果
     */
    @Override
    public int updateCarownerVehicleroute(CarownerVehicleroute carownerVehicleroute)
    {
        return carownerVehiclerouteMapper.updateCarownerVehicleroute(carownerVehicleroute);
    }

    /**
     * 批量删除车辆路线
     * 
     * @param ids 需要删除的车辆路线主键
     * @return 结果
     */
    @Override
    public int deleteCarownerVehiclerouteByIds(Long[] ids)
    {
        return carownerVehiclerouteMapper.deleteCarownerVehiclerouteByIds(ids);
    }

    /**
     * 删除车辆路线信息
     * 
     * @param id 车辆路线主键
     * @return 结果
     */
    @Override
    public int deleteCarownerVehiclerouteById(Long id)
    {
        return carownerVehiclerouteMapper.deleteCarownerVehiclerouteById(id);
    }
}
